#pragma once

#include <memory>
#include <string>

class AudioDecode {
public:
    static std::shared_ptr<AudioDecode> NewInterface();
    typedef void (funAudioDecode*)(uint8_t *data, int size);
public:
    virtual bool Open(const std::string &file) = 0;
    virtual void Close() = 0;
    virtual void Play(bool loop) = 0;
    virtual void Stop() = 0;
    virtual void Pause() = 0;
    virtual void Continue() = 0;
    virtual void Seek(double pos) = 0;
    virtual double Duration() = 0;
    virtual void SetCallback(funAudioDecode fun) = 0;
};